<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>couchdbkit.schema.util</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="couchdbkit-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="couchdbkit-module.html">Package&nbsp;couchdbkit</a> ::
        <a href="couchdbkit.schema-module.html">Package&nbsp;schema</a> ::
        Module&nbsp;util
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="couchdbkit.schema.util-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="couchdbkit.schema.util-module.html">Module couchdbkit.schema.util</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno"> 1</tt>  <tt class="py-line"> </tt>
<a name="L2"></a><tt class="py-lineno"> 2</tt>  <tt class="py-line"> </tt>
<a name="schema_map"></a><div id="schema_map-def"><a name="L3"></a><tt class="py-lineno"> 3</tt> <a class="py-toggle" href="#" id="schema_map-toggle" onclick="return toggle('schema_map');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="couchdbkit.schema.util-module.html#schema_map">schema_map</a><tt class="py-op">(</tt><tt class="py-param">schema</tt><tt class="py-op">,</tt> <tt class="py-param">dynamic_properties</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="schema_map-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="schema_map-expanded"><a name="L4"></a><tt class="py-lineno"> 4</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt id="link-0" class="py-name" targets="Module couchdbkit.ext.django.schema=couchdbkit.ext.django.schema-module.html,Package couchdbkit.schema=couchdbkit.schema-module.html"><a title="couchdbkit.ext.django.schema
couchdbkit.schema" class="py-name" href="#" onclick="return doclink('link-0', 'schema', 'link-0');">schema</a></tt><tt class="py-op">,</tt> <tt class="py-string">"wrap"</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt id="link-1" class="py-name"><a title="couchdbkit.ext.django.schema
couchdbkit.schema" class="py-name" href="#" onclick="return doclink('link-1', 'schema', 'link-0');">schema</a></tt><tt class="py-op">,</tt> <tt class="py-string">'_doc_type'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L5"></a><tt class="py-lineno"> 5</tt>  <tt class="py-line">        <tt id="link-2" class="py-name"><a title="couchdbkit.ext.django.schema
couchdbkit.schema" class="py-name" href="#" onclick="return doclink('link-2', 'schema', 'link-0');">schema</a></tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt id="link-3" class="py-name"><a title="couchdbkit.ext.django.schema
couchdbkit.schema" class="py-name" href="#" onclick="return doclink('link-3', 'schema', 'link-0');">schema</a></tt><tt class="py-op">.</tt><tt id="link-4" class="py-name" targets="Variable couchdbkit.schema.base.Document._doc_type=couchdbkit.schema.base.Document-class.html#_doc_type,Variable couchdbkit.schema.base.DocumentBase._doc_type=couchdbkit.schema.base.DocumentBase-class.html#_doc_type,Variable couchdbkit.schema.base.DocumentSchema._doc_type=couchdbkit.schema.base.DocumentSchema-class.html#_doc_type,Variable couchdbkit.schema.base.StaticDocument._doc_type=couchdbkit.schema.base.StaticDocument-class.html#_doc_type"><a title="couchdbkit.schema.base.Document._doc_type
couchdbkit.schema.base.DocumentBase._doc_type
couchdbkit.schema.base.DocumentSchema._doc_type
couchdbkit.schema.base.StaticDocument._doc_type" class="py-name" href="#" onclick="return doclink('link-4', '_doc_type', 'link-4');">_doc_type</a></tt><tt class="py-op">:</tt> <tt id="link-5" class="py-name"><a title="couchdbkit.ext.django.schema
couchdbkit.schema" class="py-name" href="#" onclick="return doclink('link-5', 'schema', 'link-0');">schema</a></tt><tt class="py-op">}</tt> </tt>
<a name="L6"></a><tt class="py-lineno"> 6</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt id="link-6" class="py-name"><a title="couchdbkit.ext.django.schema
couchdbkit.schema" class="py-name" href="#" onclick="return doclink('link-6', 'schema', 'link-0');">schema</a></tt><tt class="py-op">,</tt> <tt id="link-7" class="py-name" targets="Method couchdbkit.client.Database.list()=couchdbkit.client.Database-class.html#list,Class list=list-class.html"><a title="couchdbkit.client.Database.list
list" class="py-name" href="#" onclick="return doclink('link-7', 'list', 'link-7');">list</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L7"></a><tt class="py-lineno"> 7</tt>  <tt class="py-line">        <tt id="link-8" class="py-name"><a title="couchdbkit.ext.django.schema
couchdbkit.schema" class="py-name" href="#" onclick="return doclink('link-8', 'schema', 'link-0');">schema</a></tt> <tt class="py-op">=</tt> <tt id="link-9" class="py-name" targets="Class dict=dict-class.html"><a title="dict" class="py-name" href="#" onclick="return doclink('link-9', 'dict', 'link-9');">dict</a></tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">s</tt><tt class="py-op">.</tt><tt id="link-10" class="py-name"><a title="couchdbkit.schema.base.Document._doc_type
couchdbkit.schema.base.DocumentBase._doc_type
couchdbkit.schema.base.DocumentSchema._doc_type
couchdbkit.schema.base.StaticDocument._doc_type" class="py-name" href="#" onclick="return doclink('link-10', '_doc_type', 'link-4');">_doc_type</a></tt><tt class="py-op">,</tt> <tt class="py-name">s</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">s</tt> <tt class="py-keyword">in</tt> <tt id="link-11" class="py-name"><a title="couchdbkit.ext.django.schema
couchdbkit.schema" class="py-name" href="#" onclick="return doclink('link-11', 'schema', 'link-0');">schema</a></tt><tt class="py-op">)</tt> </tt>
<a name="L8"></a><tt class="py-lineno"> 8</tt>  <tt class="py-line"> </tt>
<a name="L9"></a><tt class="py-lineno"> 9</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-12" class="py-name" targets="Method couchdbkit.schema.base.DocumentSchema.dynamic_properties()=couchdbkit.schema.base.DocumentSchema-class.html#dynamic_properties"><a title="couchdbkit.schema.base.DocumentSchema.dynamic_properties" class="py-name" href="#" onclick="return doclink('link-12', 'dynamic_properties', 'link-12');">dynamic_properties</a></tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L10"></a><tt class="py-lineno">10</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">name</tt><tt class="py-op">,</tt> <tt class="py-name">cls</tt> <tt class="py-keyword">in</tt> <tt id="link-13" class="py-name"><a title="couchdbkit.ext.django.schema
couchdbkit.schema" class="py-name" href="#" onclick="return doclink('link-13', 'schema', 'link-0');">schema</a></tt><tt class="py-op">.</tt><tt id="link-14" class="py-name" targets="Method couchdbkit.schema.base.DocumentSchema.items()=couchdbkit.schema.base.DocumentSchema-class.html#items"><a title="couchdbkit.schema.base.DocumentSchema.items" class="py-name" href="#" onclick="return doclink('link-14', 'items', 'link-14');">items</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L11"></a><tt class="py-lineno">11</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">cls</tt><tt class="py-op">.</tt><tt id="link-15" class="py-name" targets="Variable couchdbkit.schema.base.DocumentSchema._allow_dynamic_properties=couchdbkit.schema.base.DocumentSchema-class.html#_allow_dynamic_properties,Variable couchdbkit.schema.base.StaticDocument._allow_dynamic_properties=couchdbkit.schema.base.StaticDocument-class.html#_allow_dynamic_properties"><a title="couchdbkit.schema.base.DocumentSchema._allow_dynamic_properties
couchdbkit.schema.base.StaticDocument._allow_dynamic_properties" class="py-name" href="#" onclick="return doclink('link-15', '_allow_dynamic_properties', 'link-15');">_allow_dynamic_properties</a></tt> <tt class="py-op">!=</tt> <tt id="link-16" class="py-name"><a title="couchdbkit.schema.base.DocumentSchema.dynamic_properties" class="py-name" href="#" onclick="return doclink('link-16', 'dynamic_properties', 'link-12');">dynamic_properties</a></tt><tt class="py-op">:</tt> </tt>
<a name="L12"></a><tt class="py-lineno">12</tt>  <tt class="py-line">                <tt id="link-17" class="py-name"><a title="couchdbkit.ext.django.schema
couchdbkit.schema" class="py-name" href="#" onclick="return doclink('link-17', 'schema', 'link-0');">schema</a></tt><tt class="py-op">[</tt><tt class="py-name">name</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">cls</tt><tt class="py-op">.</tt><tt class="py-name">__name__</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">cls</tt><tt class="py-op">,</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-op">{</tt> </tt>
<a name="L13"></a><tt class="py-lineno">13</tt>  <tt class="py-line">                    <tt class="py-string">'_allow_dynamic_properties'</tt><tt class="py-op">:</tt> <tt id="link-18" class="py-name"><a title="couchdbkit.schema.base.DocumentSchema.dynamic_properties" class="py-name" href="#" onclick="return doclink('link-18', 'dynamic_properties', 'link-12');">dynamic_properties</a></tt><tt class="py-op">,</tt> </tt>
<a name="L14"></a><tt class="py-lineno">14</tt>  <tt class="py-line">                <tt class="py-op">}</tt><tt class="py-op">)</tt> </tt>
<a name="L15"></a><tt class="py-lineno">15</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt id="link-19" class="py-name"><a title="couchdbkit.ext.django.schema
couchdbkit.schema" class="py-name" href="#" onclick="return doclink('link-19', 'schema', 'link-0');">schema</a></tt> </tt>
</div><a name="L16"></a><tt class="py-lineno">16</tt>  <tt class="py-line"> </tt>
<a name="L17"></a><tt class="py-lineno">17</tt>  <tt class="py-line"> </tt>
<a name="doctype_attr_of"></a><div id="doctype_attr_of-def"><a name="L18"></a><tt class="py-lineno">18</tt> <a class="py-toggle" href="#" id="doctype_attr_of-toggle" onclick="return toggle('doctype_attr_of');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="couchdbkit.schema.util-module.html#doctype_attr_of">doctype_attr_of</a><tt class="py-op">(</tt><tt class="py-param">classes</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="doctype_attr_of-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="doctype_attr_of-expanded"><a name="L19"></a><tt class="py-lineno">19</tt>  <tt class="py-line">    <tt class="py-name">doc_type_attrs</tt> <tt class="py-op">=</tt> <tt id="link-20" class="py-name" targets="Class set=set-class.html"><a title="set" class="py-name" href="#" onclick="return doclink('link-20', 'set', 'link-20');">set</a></tt><tt class="py-op">(</tt><tt class="py-name">cls</tt><tt class="py-op">.</tt><tt id="link-21" class="py-name" targets="Variable couchdbkit.schema.base.DocumentSchema._doc_type_attr=couchdbkit.schema.base.DocumentSchema-class.html#_doc_type_attr"><a title="couchdbkit.schema.base.DocumentSchema._doc_type_attr" class="py-name" href="#" onclick="return doclink('link-21', '_doc_type_attr', 'link-21');">_doc_type_attr</a></tt> <tt class="py-keyword">for</tt> <tt class="py-name">cls</tt> <tt class="py-keyword">in</tt> <tt class="py-name">classes</tt><tt class="py-op">)</tt> </tt>
<a name="L20"></a><tt class="py-lineno">20</tt>  <tt class="py-line">    <tt class="py-keyword">assert</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">doc_type_attrs</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">1</tt><tt class="py-op">,</tt> <tt class="py-string">"inconsistent doctype attr"</tt> </tt>
<a name="L21"></a><tt class="py-lineno">21</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">doc_type_attrs</tt><tt class="py-op">.</tt><tt id="link-22" class="py-name" targets="Method couchdbkit.schema.properties.LazyDict.pop()=couchdbkit.schema.properties.LazyDict-class.html#pop,Method couchdbkit.schema.properties.LazyList.pop()=couchdbkit.schema.properties.LazyList-class.html#pop,Method couchdbkit.schema.properties_proxy.LazySchemaList.pop()=couchdbkit.schema.properties_proxy.LazySchemaList-class.html#pop"><a title="couchdbkit.schema.properties.LazyDict.pop
couchdbkit.schema.properties.LazyList.pop
couchdbkit.schema.properties_proxy.LazySchemaList.pop" class="py-name" href="#" onclick="return doclink('link-22', 'pop', 'link-22');">pop</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L22"></a><tt class="py-lineno">22</tt>  <tt class="py-line"> </tt>
<a name="L23"></a><tt class="py-lineno">23</tt>  <tt class="py-line"> </tt>
<a name="get_multi_wrapper"></a><div id="get_multi_wrapper-def"><a name="L24"></a><tt class="py-lineno">24</tt> <a class="py-toggle" href="#" id="get_multi_wrapper-toggle" onclick="return toggle('get_multi_wrapper');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="couchdbkit.schema.util-module.html#get_multi_wrapper">get_multi_wrapper</a><tt class="py-op">(</tt><tt class="py-param">classes</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="get_multi_wrapper-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="get_multi_wrapper-expanded"><a name="L25"></a><tt class="py-lineno">25</tt>  <tt class="py-line">    <tt class="py-name">doctype_attr</tt> <tt class="py-op">=</tt> <tt id="link-23" class="py-name" targets="Function couchdbkit.schema.util.doctype_attr_of()=couchdbkit.schema.util-module.html#doctype_attr_of"><a title="couchdbkit.schema.util.doctype_attr_of" class="py-name" href="#" onclick="return doclink('link-23', 'doctype_attr_of', 'link-23');">doctype_attr_of</a></tt><tt class="py-op">(</tt><tt class="py-name">classes</tt><tt class="py-op">.</tt><tt class="py-name">values</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L26"></a><tt class="py-lineno">26</tt>  <tt class="py-line"> </tt>
<a name="L27"></a><tt class="py-lineno">27</tt>  <tt class="py-line">    <tt class="py-keyword">def</tt> <tt class="py-def-name">wrap</tt><tt class="py-op">(</tt><tt class="py-param">doc</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L28"></a><tt class="py-lineno">28</tt>  <tt class="py-line">        <tt class="py-name">doc_type</tt> <tt class="py-op">=</tt> <tt id="link-24" class="py-name" targets="Method couchdbkit.designer.fs.FSDoc.doc()=couchdbkit.designer.fs.FSDoc-class.html#doc"><a title="couchdbkit.designer.fs.FSDoc.doc" class="py-name" href="#" onclick="return doclink('link-24', 'doc', 'link-24');">doc</a></tt><tt class="py-op">.</tt><tt id="link-25" class="py-name" targets="Class Method couchdbkit.schema.base.DocumentBase.get()=couchdbkit.schema.base.DocumentBase-class.html#get"><a title="couchdbkit.schema.base.DocumentBase.get" class="py-name" href="#" onclick="return doclink('link-25', 'get', 'link-25');">get</a></tt><tt class="py-op">(</tt><tt class="py-name">doctype_attr</tt><tt class="py-op">)</tt> </tt>
<a name="L29"></a><tt class="py-lineno">29</tt>  <tt class="py-line">        <tt class="py-name">cls</tt> <tt class="py-op">=</tt> <tt class="py-name">classes</tt><tt class="py-op">[</tt><tt class="py-name">doc_type</tt><tt class="py-op">]</tt> </tt>
<a name="L30"></a><tt class="py-lineno">30</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">cls</tt><tt class="py-op">.</tt><tt id="link-26" class="py-name" targets="Class Method couchdbkit.schema.base.DocumentSchema.wrap()=couchdbkit.schema.base.DocumentSchema-class.html#wrap"><a title="couchdbkit.schema.base.DocumentSchema.wrap" class="py-name" href="#" onclick="return doclink('link-26', 'wrap', 'link-26');">wrap</a></tt><tt class="py-op">(</tt><tt id="link-27" class="py-name"><a title="couchdbkit.designer.fs.FSDoc.doc" class="py-name" href="#" onclick="return doclink('link-27', 'doc', 'link-24');">doc</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L31"></a><tt class="py-lineno">31</tt>  <tt class="py-line"> </tt>
<a name="L32"></a><tt class="py-lineno">32</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt id="link-28" class="py-name"><a title="couchdbkit.schema.base.DocumentSchema.wrap" class="py-name" href="#" onclick="return doclink('link-28', 'wrap', 'link-26');">wrap</a></tt> </tt>
</div><a name="L33"></a><tt class="py-lineno">33</tt>  <tt class="py-line"> </tt>
<a name="L34"></a><tt class="py-lineno">34</tt>  <tt class="py-line"> </tt>
<a name="schema_wrapper"></a><div id="schema_wrapper-def"><a name="L35"></a><tt class="py-lineno">35</tt> <a class="py-toggle" href="#" id="schema_wrapper-toggle" onclick="return toggle('schema_wrapper');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="couchdbkit.schema.util-module.html#schema_wrapper">schema_wrapper</a><tt class="py-op">(</tt><tt class="py-param">schema</tt><tt class="py-op">,</tt> <tt class="py-param">dynamic_properties</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="schema_wrapper-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="schema_wrapper-expanded"><a name="L36"></a><tt class="py-lineno">36</tt>  <tt class="py-line">    <tt class="py-name">mapping</tt> <tt class="py-op">=</tt> <tt id="link-29" class="py-name" targets="Function couchdbkit.schema.util.schema_map()=couchdbkit.schema.util-module.html#schema_map"><a title="couchdbkit.schema.util.schema_map" class="py-name" href="#" onclick="return doclink('link-29', 'schema_map', 'link-29');">schema_map</a></tt><tt class="py-op">(</tt><tt id="link-30" class="py-name"><a title="couchdbkit.ext.django.schema
couchdbkit.schema" class="py-name" href="#" onclick="return doclink('link-30', 'schema', 'link-0');">schema</a></tt><tt class="py-op">,</tt> <tt id="link-31" class="py-name"><a title="couchdbkit.schema.base.DocumentSchema.dynamic_properties" class="py-name" href="#" onclick="return doclink('link-31', 'dynamic_properties', 'link-12');">dynamic_properties</a></tt><tt class="py-op">)</tt> </tt>
<a name="L37"></a><tt class="py-lineno">37</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt id="link-32" class="py-name" targets="Function couchdbkit.schema.util.get_multi_wrapper()=couchdbkit.schema.util-module.html#get_multi_wrapper"><a title="couchdbkit.schema.util.get_multi_wrapper" class="py-name" href="#" onclick="return doclink('link-32', 'get_multi_wrapper', 'link-32');">get_multi_wrapper</a></tt><tt class="py-op">(</tt><tt class="py-name">mapping</tt><tt class="py-op">)</tt> </tt>
</div><a name="L38"></a><tt class="py-lineno">38</tt>  <tt class="py-line"> </tt>
<a name="L39"></a><tt class="py-lineno">39</tt>  <tt class="py-line"> </tt>
<a name="maybe_schema_wrapper"></a><div id="maybe_schema_wrapper-def"><a name="L40"></a><tt class="py-lineno">40</tt> <a class="py-toggle" href="#" id="maybe_schema_wrapper-toggle" onclick="return toggle('maybe_schema_wrapper');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="couchdbkit.schema.util-module.html#maybe_schema_wrapper">maybe_schema_wrapper</a><tt class="py-op">(</tt><tt class="py-param">wrapper</tt><tt class="py-op">,</tt> <tt class="py-param">schema</tt><tt class="py-op">,</tt> <tt class="py-param">params</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="maybe_schema_wrapper-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="maybe_schema_wrapper-expanded"><a name="L41"></a><tt class="py-lineno">41</tt>  <tt class="py-line">    <tt id="link-33" class="py-name"><a title="couchdbkit.schema.base.DocumentSchema.dynamic_properties" class="py-name" href="#" onclick="return doclink('link-33', 'dynamic_properties', 'link-12');">dynamic_properties</a></tt> <tt class="py-op">=</tt> <tt class="py-name">params</tt><tt class="py-op">.</tt><tt id="link-34" class="py-name"><a title="couchdbkit.schema.properties.LazyDict.pop
couchdbkit.schema.properties.LazyList.pop
couchdbkit.schema.properties_proxy.LazySchemaList.pop" class="py-name" href="#" onclick="return doclink('link-34', 'pop', 'link-22');">pop</a></tt><tt class="py-op">(</tt><tt class="py-string">'dynamic_properties'</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L42"></a><tt class="py-lineno">42</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">wrapper</tt> <tt class="py-keyword">or</tt> <tt id="link-35" class="py-name" targets="Function couchdbkit.schema.util.schema_wrapper()=couchdbkit.schema.util-module.html#schema_wrapper"><a title="couchdbkit.schema.util.schema_wrapper" class="py-name" href="#" onclick="return doclink('link-35', 'schema_wrapper', 'link-35');">schema_wrapper</a></tt><tt class="py-op">(</tt><tt id="link-36" class="py-name"><a title="couchdbkit.ext.django.schema
couchdbkit.schema" class="py-name" href="#" onclick="return doclink('link-36', 'schema', 'link-0');">schema</a></tt><tt class="py-op">,</tt> <tt id="link-37" class="py-name"><a title="couchdbkit.schema.base.DocumentSchema.dynamic_properties" class="py-name" href="#" onclick="return doclink('link-37', 'dynamic_properties', 'link-12');">dynamic_properties</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L43"></a><tt class="py-lineno">43</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="couchdbkit-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Fri May  4 11:48:42 2012
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
